def findButtonPermission(role_obj,key):
    menu_list = role_obj.menu.filter(menu_type=2)
    headPermisson = []
    operaPermisson = []
    head = ['add','query']
    for i in menu_list:
        if i.parent.key == key:
            if i.key in head:
                headPermisson.append(i.key)
            else:
                operaPermisson.append(i.key)
    return {'headPermisson':headPermisson,'operaPermisson':operaPermisson}